<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-cn" xml:lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>书籍分类树</title>
<link rel="stylesheet" type="text/css" href="<?=URL::site()?>styles/admin/stylesheet.css" />
<script type="text/javascript" src="<?=URL::site()?>scripts/dtree/dtree.js"></script>
<style type="text/css">
img {vertical-align:middle;}
a {text-decoration:none;}
</style>
</head>
<body style="background:none; margin:0 0 0 5px; padding:0; height:auto;">
<div style="background:#F5FAFF; padding:5px; border:1px solid #555; font-size:12px; min-height:520px; +height:520px; line-height:170%; ">
<script type="text/javascript">
d = new dTree('d', '<?=URL::site('scripts/dtree')?>');
d.add(0, -1, '文章分类树');
<?
foreach ($categories as $cat) {
    $prex = $cat['is_parent'] ? '+' : '-';
    echo "d.add('{$cat['cat_id']}', '{$cat['parent_id']}', '{$prex} {$cat['name']} ({$cat['sort_order']}) <img src=\"".URL::site()."images/admin/".($cat['is_show']?'yes':'no').".gif\">', '".URL::site('admin/article_category/edit/'.$cat['cat_id'])."', '{$cat['name']}', 'editFrame');\n";
}
?>
document.write(d);
//d.closeAll();
</script>
</div>
</body>
</html>